﻿package mortal.game.view.copy.ChallengeCopy.data
{
    import Message.DB.Tables.*;
    import Message.Public.*;
    import mortal.game.resource.tableConfig.*;

    public class ChallengeData extends Object
    {
        private var _tChallengCopy:TChallengeCopy;
        private var _fastTime:int;
        public var passLevel:int = 0;

        public function ChallengeData(param1:TChallengeCopy)
        {
            this.tChallengCopy = param1;
            return;
        }// end function

        public function set tChallengCopy(param1:TChallengeCopy) : void
        {
            this._tChallengCopy = param1;
            return;
        }// end function

        public function get tChallengCopy() : TChallengeCopy
        {
            return this._tChallengCopy;
        }// end function

        public function get currentSectionMaxLevel() : int
        {
            var _loc_1:* = ChallengeCopyConfig.instance.getMaxLevelByTowerAndSection(this._tChallengCopy.tower, this._tChallengCopy.section);
            return _loc_1;
        }// end function

        public function set fastTime(param1:SChallengeCopyRecords) : void
        {
            var _loc_2:SChallengeCopyRecord = null;
            for each (_loc_2 in param1.records)
            {
                
                if (_loc_2.diff == this._tChallengCopy.level)
                {
                    if (this._fastTime <= 0 || _loc_2.usetime <= this._fastTime)
                    {
                        this._fastTime = _loc_2.usetime;
                    }
                }
            }
            return;
        }// end function

    }
}
